package com.haixee.parkdemo.auth.dao;

import com.haixee.parkdemo.auth.entity.dto.*;
import com.haixee.parkdemo.auth.model.Role;
import com.haixee.parkdemo.auth.model.User;

import java.util.Collection;
import java.util.List;
import java.util.Set;

public interface UserCustomMapper {

    Boolean existUidAcl(Integer uid, Integer aclId);

    User selectByUsername(String username);

    List<User> selectAll(Integer tenantId);

    List<Integer> selectJobIdByUidAcl(Integer uid, Integer aclId);

    Set<Integer> selectJobIdByJobAcl(Integer jobId, Integer aclId);

    Set<Integer> selectJobIdByUid(Integer uid);

    List<JobRoleDTO> selectDTOByUidAcl(Integer uid, Integer aclId);

    List<String> selectJobNameByUid(Integer uid);

    List<UserDTO> selectAllWithJob(Integer tenantId);

    List<Role> selectUserRoleByTenantId(Integer uid, Integer tenantId);
    List<RoleDTO> selectRoleDTOByTenantId(Integer uid, Integer tenantId);

    List<UserRoleDTO> selectUserRoleByUidInAndTenantId(Collection<Integer> uidList, Integer tenantId);

    List<UserOrganizeDTO> selectUserOrganizeByUidInAndTenantId(Collection<Integer> uidList, Integer tenantId);

    List<UserAllDTO> selectUserAllDTOList(Integer tenantId, Collection<Integer> orgIdList);

    List<UserAllDTO> selectUserAllDTOListByUid(Integer uid, Integer tenantId, Integer organizeId);

    void deleteUserRole(Integer uid);

    void insertUserRole(Integer uid, Collection<Integer> roleIdList);
}